﻿@model KingRoad.EPM.Web.Areas.Device.Models.MeterModel
@{
    Layout = null;
    ViewBag.Title = "仪表添加";
}
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function dialogRefresh(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            $("#pagerForm", navTab.getCurrentPanel()).submit();
            $.pdialog.closeCurrent();
        }
    }
</script>
@{Html.EnableClientValidation();}
@using (Html.BeginForm("MeterAddHandle", "Meter", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogRefresh);", @class = "pageForm required-validate" }))
{
  
    <div class="pageContent">
        <div class="pageFormContent sortDrag" layouth="60">
            <dl>
                <dt>仪表编号：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.Code, new Dictionary<string, object> { { "class", "required input02" }})
                     <td>@Html.ValidationMessageFor(model => model.info.Code)</td>
                </dd>
            </dl>

           <dl>
                <dt>仪表型号：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.Model)
                </dd>
            </dl>
           <dl>
                <dt>DTU编号：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.DDUCode)
                </dd>
            </dl>
         <dl>
                <dt>授权日期：</dt>
                <dd>
                    @Html.TextBoxFor(m => m.info.BandDate, new { @readonly = "true", Value = @DateTime.Now.ToString("yyyy-MM-dd") })
                </dd>
            </dl>
              <dl>
                <dt>SIM卡号：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.ManufCode)
                </dd>
            </dl>
            
              <dl>
                <dt>芯片编号：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.ChipCode)
                </dd>
            </dl>
             <dl>
                <dt>SIM到期日期：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.BatchId, new { Value="0"})
                </dd>
            </dl>
              <dl>
                <dt>生产日期：</dt>
                <dd>
                 @Html.TextBoxFor(m => m.info.ManufDate, new {@class = "date", Value = @DateTime.Now.ToString("yyyy-MM-dd") })
                </dd>
            </dl>
              <dl class="nowrap">
                <dt>主要原材料组成：</dt>
                <dd>
                 @Html.TextAreaFor(m => m.info.Material, new { cols = "30", rows = "8" })
                </dd>
            </dl>
        </div>
        <div class="formBar">
            <ul>
                @if (ViewBag.OperationType != "view")
                {
                    <li>
                        <button type="submit" class="btn btn-sm">保存</button>
                    </li>
                }

                <li>
                    <button type="button" class="close btn btn-default btn-sm">取消</button>
                </li>
            </ul>
        </div>

    </div>
}
